package com.ajx.todo.study.architecturecomponent;

import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.ViewModel;

/**
 * Created by lai on 2017/9/1.
 */

public class UserProfileViewModel extends ViewModel {


    private LiveData<User> user;
    private UserRepository userRepository;

    public UserProfileViewModel(UserRepository userRepository) {
        this.userRepository = userRepository;
    }

    public LiveData<User> getUser() {
        return this.user;
    }

    public void init() {
       user= userRepository.getUser();
    }


}
